/**
 * 
 */
package com.sunwayhorizo.health.business.clinic.emr.template;

import java.util.List;

import javax.ejb.Local;

import com.sunwayhorizo.health.business.dto.ResultsDTO;
import com.sunwayhorizo.health.business.dto.clinic.emr.template.TemplateClassDTO;
import com.sunwayhorizo.health.ets.exceptions.ETSException;
import com.sunwayhorizo.health.hl7.common.Hl7Exception;

/**
 * @ClassName TempClassManagerLocal <br>
 * @PackageName com.sunwayhorizo.health.business.emr.template <br>
 * @Description 模板类别管理接口 <br>
 * @Author jinzw <br>
 * @Date 2010-12-21 <br>
 * @Version 1.0 <br>
 * @ModifiedDesc <br>
 * @ModifiedDate <br>
 * @ModifiedBy <br>
 * @Copyright 2010-2020 北京三维海容 All Rights Reserved. <br>
 */
@Local
public interface TemplateClassManagerLocal {

	/**
	 * 添加模板分类
	 * @param category
	 * @return
	 * @throws Hl7Exception
	 * @throws ETSException
	 */
	public ResultsDTO newTemplateClass(TemplateClassDTO category)  throws Hl7Exception;
	
    /**
     * 删除模板分类
     * @param ids
     * @return
     * @throws Hl7Exception
     */
	@SuppressWarnings("rawtypes")
	public ResultsDTO delTemplateClass(List ids) throws Hl7Exception;
	
	/**
	 * 修改模板分类
	 * @param category
	 * @return
	 * @throws Hl7Exception
	 * @throws ETSException
	 */
	public ResultsDTO updateTemplateClass(TemplateClassDTO category) throws Hl7Exception;
	
	/**
	 * 查询所有模板分类树
	 * @return
	 * @throws Hl7Exception
	 */
	public ResultsDTO findClassTree() throws Hl7Exception;
	
	/**
	 * 根据父节点判断是否有子节点
	 * 0 代表有子节点 
	 * 1代表没有子节点
	 * @param fatherId 
	 * @return
	 * @throws Hl7Exception
	 */
	public String findChildListByFatherId(long fatherId) throws Hl7Exception;
	
	/**
	 * 查询所有病历分类树，根据父id查询出所有的子节点
	 * @param fatherId 父节点ID
	 * @return
	 * @throws Hl7Exception
	 */
	public ResultsDTO findWriteClassTree(String fatherId) throws Hl7Exception;
	
	/**
	 * 根据父classCode查询分类树
	 * @param fatherClassCode
	 * @return
	 * @throws Hl7Exception
	 */
	public ResultsDTO findWriteClassTreeByFCode(String fatherClassCode) throws Hl7Exception;
	
	/**
	 * 根据模板父id查找子id集合
	 * @param fatherId
	 * @return
	 * @throws Hl7Exception
	 */
	public List<Long> findTemplateClassIdByFatherId(String fatherId) throws Hl7Exception;
	
}
